package com.yhsimon.observer;

/**
 * @author： YHSimon
 * @date： 2021-10-18 20:54
 */
public class Client {
    public static void main(String[] args) {
        //创建接入方
        CurrentConditions currentConditions = new CurrentConditions();
        //创建WeatherData 并将接入方传入WeatherData中
        WeatherData weatherData = new WeatherData(currentConditions);

        //更新天气情况
        weatherData.setData(30, 150, 50);

        //天气情况变化
        System.out.println("======天气情况变化======");
        weatherData.setData(40, 150, 20);

    }
}
